home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / graphics.17 / graphics / graphics-0.17 / plot2tek / fontsize.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-12  |  1.3 KB  |  39 lines

  1. /* libtek, a library of functions for tektronics 4010 compatible devices.
  2.    Copyright (C) 1989 Free Software Foundation, Inc.
  3.  
  4. libtek is distributed in the hope that it will be useful, but WITHOUT ANY
  5. WARRANTY.  No author or distributor accepts responsibility to anyone for the
  6. consequences of using it or for whether it serves any particular purpose or
  7. works at all, unless he says so in writing.  Refer to the GNU General Public
  8. License for full details.
  9.  
  10. Everyone is granted permission to copy, modify and redistribute libtek, but
  11. only under the conditions described in the GNU General Public License.  A copy
  12. of this license is supposed to have been given to you along with libtek so
  13. you can know your rights and responsibilities.  It should be in a file named
  14. COPYING.  Among other things, the copyright notice and this notice must be
  15. preserved on all copies.  */
  16.  
  17. /* FONTSIZE takes a single integer argument SIZE and sets the font
  18.    size accordingly. */
  19.  
  20. #include "sys-defines.h"
  21. #include "libplot.h"
  22.  
  23. int
  24. fontsize (size)
  25.     int size;
  26. {
  27.   font_size = size;
  28.   if (font_size >= 14.)
  29.     fputs ("\0333", stdout);
  30.   else if (font_size >= 12.)
  31.     fputs ("\0332", stdout);
  32.   else if (font_size >= 10.)
  33.     fputs ("\0331", stdout);
  34.   else
  35.     fputs ("\0330", stdout);
  36.  
  37.   return 0;
  38. }
  39.